<!DOCTYPE HTML>
<html lang="zh-CN">


<head>
    <meta charset="utf-8">
    <meta name="keywords" content="小程序开发wepy框架类vue的开发方式, 小康,xkloveme,博客">
    <meta name="description" content="1.node 的安装节点网官下载
推荐左边的安装方式，因为右边的最新版本在有些电脑上运行不稳定。
下载到本地一直继续就好。
安装好后就可以直接在命令行运行查看结果

2.快速入门
WePY 是一款让小程序支持组件化开发的框架，通过预编译的手">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <meta name="renderer" content="webkit|ie-stand|ie-comp">
    <meta name="mobile-web-app-capable" content="yes">
    <meta name="format-detection" content="telephone=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
    <title>小程序开发wepy框架类vue的开发方式 | 小康之家</title>
    <link rel="icon" type="image/x-icon, image/vnd.microsoft.icon" href="/favicon.ico">

    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/font-awesome/5.12.1/css/all.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/materialize/1.0.0/css/materialize.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/aos/3.0.0-beta.6/aos.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/animate.css/3.5.1/animate.min.css">
    <link rel="stylesheet" type="text/css" href="https://cdn.bootcss.com/lightgallery/1.6.11/css/lightgallery.min.css">
    <link rel="stylesheet" type="text/css" href="/css/matery.css">
    <link rel="stylesheet" type="text/css" href="/css/my.css">
    
    <script src="https://cdn.bootcss.com/jquery/3.4.1/jquery.min.js"></script>
    
<meta name="generator" content="Hexo 4.2.0"><link rel="alternate" href="/atom.xml" title="小康之家" type="application/atom+xml">
<link rel="stylesheet" href="/css/prism-tomorrow.css" type="text/css"></head>


<body >
    <header class="navbar-fixed">
    <nav id="headNav" class="bg-color nav-transparent">
        <div id="navContainer" class="nav-wrapper head-container">
            <div class="brand-logo">
                <a href="/" class="waves-effect waves-light">
                    
                    <img src="/medias/logo.png" class="logo-img" alt="LOGO">
                    
                    <span class="logo-span">小康之家</span>
                </a>
            </div>
            

<a href="#" data-target="mobile-nav" class="sidenav-trigger button-collapse"><i class="fas fa-bars"></i></a>
<ul class="right nav-menu">
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/" class="waves-effect waves-light">
      
      <i class="fas fa-home" style="zoom: 0.6;"></i>
      
      <span>首页</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/tags" class="waves-effect waves-light">
      
      <i class="fas fa-tags" style="zoom: 0.6;"></i>
      
      <span>标签</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/categories" class="waves-effect waves-light">
      
      <i class="fas fa-bookmark" style="zoom: 0.6;"></i>
      
      <span>分类</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/archives" class="waves-effect waves-light">
      
      <i class="fas fa-archive" style="zoom: 0.6;"></i>
      
      <span>归档</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/about" class="waves-effect waves-light">
      
      <i class="fas fa-user-circle" style="zoom: 0.6;"></i>
      
      <span>关于</span>
    </a>
    
  </li>
  
  <li class="hide-on-med-and-down nav-item">
    
    <a href="/friends" class="waves-effect waves-light">
      
      <i class="fas fa-address-book" style="zoom: 0.6;"></i>
      
      <span>友情链接</span>
    </a>
    
  </li>
  
  <li>
    <a href="#searchModal" class="modal-trigger waves-effect waves-light">
      <i id="searchIcon" class="fas fa-search" title="搜索" style="zoom: 0.85;"></i>
    </a>
  </li>
</ul>

<div id="mobile-nav" class="side-nav sidenav">

    <div class="mobile-head bg-color">
        
        <img src="/medias/logo.png" class="logo-img circle responsive-img">
        
        <div class="logo-name">小康之家</div>
        <div class="logo-desc">
            
            小康のblog
            
        </div>
    </div>

    

    <ul class="menu-list mobile-menu-list">
        
        <li class="m-nav-item">
	  
		<a href="/" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-home"></i>
			
			首页
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/tags" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-tags"></i>
			
			标签
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/categories" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-bookmark"></i>
			
			分类
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/archives" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-archive"></i>
			
			归档
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/about" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-user-circle"></i>
			
			关于
		</a>
          
        </li>
        
        <li class="m-nav-item">
	  
		<a href="/friends" class="waves-effect waves-light">
			
			    <i class="fa-fw fas fa-address-book"></i>
			
			友情链接
		</a>
          
        </li>
        
        
        <li><div class="divider"></div></li>
        <li>
            <a href="https://github.com/xkloveme" class="waves-effect waves-light" target="_blank">
                <i class="fab fa-github-square fa-fw"></i>Fork Me
            </a>
        </li>
        
    </ul>
</div>

        </div>

        
            <style>
  .nav-transparent .github-corner {
    display: none !important;
  }

  .github-corner {
    position: absolute;
    z-index: 10;
    top: 0;
    right: 0;
    border: 0;
    transform: scale(1.1);
  }

  .github-corner svg {
    color: #027aff;
    fill: #fff;
    height: 64px;
    width: 64px;
  }

  .github-corner:hover .octo-arm {
    animation: a 0.56s ease-in-out;
  }

  .github-corner .octo-arm {
    animation: none;
  }

  @keyframes a {
    0%,
    to {
      transform: rotate(0);
    }
    20%,
    60% {
      transform: rotate(-25deg);
    }
    40%,
    80% {
      transform: rotate(10deg);
    }
  }
</style>

<a
  href="https://github.com/xkloveme"
  class="github-corner tooltipped hide-on-med-and-down"
  target="_blank"
  data-tooltip="Fork Me"
  data-position="left"
  data-delay="50"
>
  <svg viewBox="0 0 250 250" aria-hidden="true">
    <path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path>
    <path
      d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2"
      fill="currentColor"
      style="transform-origin: 130px 106px;"
      class="octo-arm"
    ></path>
    <path
      d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z"
      fill="currentColor"
      class="octo-body"
    ></path>
  </svg>
</a>

        
    </nav>

</header>

    



<div class="bg-cover pd-header post-cover" style="background-image: url('https://picsum.photos/600/300?t=e40udcug3po')">
    <div class="container" style="right: 0px;left: 0px;">
        <div class="row">
            <div class="col s12 m12 l12">
                <div class="brand">
                    <div class="description center-align post-title">
                        小程序开发wepy框架类vue的开发方式
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>




<main class="post-container content">

    
    <link rel="stylesheet" href="https://cdn.bootcss.com/tocbot/4.10.0/tocbot.css">
<style>
    #articleContent h1::before,
    #articleContent h2::before,
    #articleContent h3::before,
    #articleContent h4::before,
    #articleContent h5::before,
    #articleContent h6::before {
        display: block;
        content: " ";
        height: 100px;
        margin-top: -100px;
        visibility: hidden;
    }

    #articleContent :focus {
        outline: none;
    }

    .toc-fixed {
        position: fixed;
        top: 64px;
    }

    .toc-widget {
        padding-left: 20px;
    }

    .toc-widget .toc-title {
        margin: 35px 0 15px 0;
        padding-left: 17px;
        font-size: 1.5rem;
        font-weight: bold;
        line-height: 1.5rem;
    }

    .toc-widget ol {
        padding: 0;
        list-style: none;
    }

    #toc-content ol {
        padding-left: 10px;
    }

    #toc-content ol li {
        padding-left: 10px;
    }

    #toc-content .toc-link:hover {
        color: #42b983;
        font-weight: 700;
        text-decoration: underline;
    }

    #toc-content .toc-link::before {
        background-color: transparent;
        max-height: 25px;
    }

    #toc-content .is-active-link {
        color: #42b983;
    }

    #toc-content .is-active-link::before {
        background-color: #42b983;
    }

    #floating-toc-btn {
        position: fixed;
        right: 15px;
        bottom: 76px;
        padding-top: 15px;
        margin-bottom: 0;
        z-index: 998;
    }

    #floating-toc-btn .btn-floating {
        width: 48px;
        height: 48px;
    }

    #floating-toc-btn .btn-floating i {
        line-height: 48px;
        font-size: 1.4rem;
    }
</style>
<div class="row">
    <div id="main-content" class="col s12 m12 l9">
        <!-- 文章内容详情 -->
<div id="artDetail">
    <div class="card">
        <div class="card-content article-info">
            <div class="row tag-cate">
                <div class="col s7">
                    
                    <div class="article-tag">
                        
                            <a href="/tags/%E5%89%8D%E7%AB%AF/">
                                <span class="chip bg-color">前端</span>
                            </a>
                        
                    </div>
                    
                </div>
                <div class="col s5 right-align">
                    
                    <div class="post-cate">
                        <i class="fas fa-bookmark fa-fw icon-category"></i>
                        
                            <a href="/categories/%E5%89%8D%E7%AB%AF/" class="post-category">
                                前端
                            </a>
                        
                    </div>
                    
                </div>
            </div>

            <div class="post-info">
                
                <div class="post-date info-break-policy">
                    <i class="far fa-calendar-minus fa-fw"></i>发布日期:&nbsp;&nbsp;
                    2018-01-18
                </div>
                

                

                
                <div class="info-break-policy">
                    <i class="far fa-file-word fa-fw"></i>文章字数:&nbsp;&nbsp;
                    2.4k
                </div>
                

                
                <div class="info-break-policy">
                    <i class="far fa-clock fa-fw"></i>阅读时长:&nbsp;&nbsp;
                    11 分
                </div>
                
				
                
                    <div id="busuanzi_container_page_pv" class="info-break-policy">
                        <i class="far fa-eye fa-fw"></i>阅读次数:&nbsp;&nbsp;
                        <span id="busuanzi_value_page_pv"></span>
                    </div>
				
            </div>
            
        </div>
        <hr class="clearfix">
        <div class="card-content article-card-content">
            <div id="articleContent">
                <h2 id="1-node-的安装"><a href="#1-node-的安装" class="headerlink" title="1.node 的安装"></a>1.node 的安装</h2><p><a href="https://nodejs.org/en/" target="_blank" rel="noopener">节点网官</a>下载<br><img src="http://img.blog.csdn.net/20170602210731167?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcmVzX21pbg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="节点官网截取"></p>
<p>推荐左边的安装方式，因为右边的最新版本在有些电脑上运行不稳定。</p>
<p>下载到本地一直继续就好。</p>
<p>安装好后就可以直接在命令行运行查看结果</p>
<p><img src="http://img.blog.csdn.net/20170602211312287?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcmVzX21pbg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="这里写图片描述"></p>
<h2 id="2-快速入门"><a href="#2-快速入门" class="headerlink" title="2.快速入门"></a>2.快速入门</h2><blockquote>
<p>WePY 是一款让小程序支持组件化开发的框架，通过预编译的手段让开发者可以选择自己喜欢的开发风格去开发小程序。框架的细节优化，无极，异步功能的引入都是为了能让开发小程序项目变得更加简单，高效。</p>
<p>同时 WePY 也是一款成长中的框架，大量吸收借鉴了一些优化前端工具以及框架的设计理念和思想。如果 WePY 有不足地方，或者你有更好的想法，欢迎提交发行或者 PR。</p>
</blockquote>
<p><strong>安装（更新）wepy 命令行工具。</strong></p>
<pre><code>npm install wepy-cli -g</code></pre><p><strong>在开发目录生成开发 DEMO。</strong></p>
<pre><code>wepy new demo</code></pre><p><strong>切换至项目目录。</strong></p>
<pre><code>cd demo</code></pre><p><strong>打开目录</strong><br>窗口</p>
<pre><code> dir</code></pre><p><strong>项目目录结构</strong></p>
<pre><code>├── dist                   微信开发者工具指定的目录
├── node_modules
├── src                    代码编写的目录
|   ├── components         组件文件夹（非完整页面）
|   |   ├── com_a.wpy      可复用组件 a
|   |   └── com_b.wpy      可复用组件 b
|   ├── pages              页面文件夹（完整页面）
|   |   ├── index.wpy      页面 index
|   |   └── page.wpy       页面 page
|   └── app.wpy            小程序配置项（全局样式配置、声明钩子等）
└── package.json           package 配置</code></pre><p><strong>开发使用说明</strong></p>
<ol>
<li>使用<code>微信开发者工具</code>新建项目，开发本地选择<code>dist</code>目录。</li>
<li><code>微信开发者工具</code> - &gt;项目 - &gt;关闭 ES6 转 ES5。</li>
<li>本地项目根目录运行<code>wepy build --watch</code>，开启实时编译。</li>
</ol>
<p><strong>代码高亮</strong></p>
<blockquote>
<p>VScode 下代码高亮</p>
</blockquote>
<p><strong>先下载</strong></p>
<p><img src="http://img.blog.csdn.net/20170602212828288?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcmVzX21pbg==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="这里写图片描述"></p>
<blockquote>
<p>配置展示进入设置<br>在 settings.js 文件下添加如下代码</p>
</blockquote>
<pre><code>&quot;files.associations&quot;: {
        &quot;*.vue&quot;: &quot;vue&quot;,
        &quot;*.wpy&quot;: &quot;vue&quot;,
        &quot;*.wxml&quot;: &quot;html&quot;,
        &quot;*.wxss&quot;: &quot;css&quot;
    },
    &quot;emmet.syntaxProfiles&quot;: {
        &quot;vue-html&quot;: &quot;html&quot;,
        &quot;vue&quot;: &quot;html&quot;
    }</code></pre><p>后就保存在可以中页面看待<code>.wpy</code>后缀代码高亮</p>
<blockquote>
<p>Sublime 下载码高亮<br>文件后缀为.wpy，可共用 vue 高亮，但需要手动安装。<br>打开 Sublime-&gt; Preferences-&gt; Browse Packages ..进入用户包文件夹。<br>在此文件夹下打开 cmd，运行 git clone <a href="mailto:git@github.com">git@github.com</a>：vuejs / VUE -句法- highlight.git，无 GIT 用户可以直接下载拉链包解压至当前文件夹。<br>关闭.wpy 文件重新打开即可高亮。</p>
<p>WebStorm 下代码高亮<br>打开首选项，搜索插件，搜索 Vue.js 插件并安装。<br>打开首选项，搜索文件类型，找到 Vue.js 模板，在注册模式添加* .wpy，即可高亮。</p>
<p>Atom 下代码高亮<br>在 Atom 里先安装 vue 的语法高亮 - language-vue，如果装过了就忽略这一步。<br>打开 Atom - &gt;配置菜单。在 core 键下添加：</p>
</blockquote>
<pre><code>customFileTypes:
   &quot;text.html.vue&quot;: [
      &quot;wpy&quot;
   ]</code></pre><h2 id="3，代码规范"><a href="#3，代码规范" class="headerlink" title="3，代码规范"></a>3，代码规范</h2><ol>
<li>变量与方法使用尽量使用驼峰式命名，避免使用$开头。</li>
<li>入口，页面，组件的命名后缀为.wpy。外链的文件可以是其它后缀。</li>
<li>使用 ES6 语法开发。框架在 ES6 下开发，因此也需要使用 ES6 开发小程序，ES6 中有大量的语法糖可以让我们的代码更加简洁高效。</li>
<li>甚至可以直接使用异步/等待等新特性进行开发。</li>
<li>事件绑定语法使用优化语法代替：原 bindtap =“click”替换为@ tap =“click”，原 catchtap =“click”替换为@ tap.stop =“click”。更多@符用法</li>
<li>事件传参使用优化后语法代替：原 bindtap =“click”data-index = { {index}}替换为@ tap =“click（{ {index}}）”。</li>
<li>自定义组件命名应避开微信原生组件以及功能标签。不可以使用输入，按钮，查看，重复等命名自定义组件。</li>
</ol>
<h2 id="4-优点"><a href="#4-优点" class="headerlink" title="4.优点"></a>4.优点</h2><ol>
<li>支持组件化开发。</li>
<li>支持加载外部 NPM 包。</li>
<li>单文件模式，使得目录结构更加清晰。</li>
<li>默认使用巴别编译，支持 ES6 / 7 的一些新特性。</li>
<li>针对原生 API 进行优化。</li>
</ol>
<h2 id="5-wpy-文件说明"><a href="#5-wpy-文件说明" class="headerlink" title="5.wpy 文件说明"></a>5.wpy 文件说明</h2><p>一个<code>.wpy</code>文件分为三个部分：<br>1 .样式对应原有 wxss。2.<br>模板对应原有 wxml。3.<br>代码对应原有 js。</p>
<p>其中入口文件 app.wpy 不需要模板，所以编译时会被忽略。这三个标签都支持郎和 SRC 属性，郎决定了其代码编译过程，SRC 决定是否外联代码，存在 SRC 属性且有效时，忽略内联代码，示例如下：</p>
<pre><code>&lt;style lang=&quot;less&quot; src=&quot;page1.less&quot;&gt;style&gt;
&lt;template lang=&quot;wxml&quot; src=&quot;page1.wxml&quot;&gt;template&gt;
&lt;script&gt;
    // some code
script&gt;</code></pre><p>标签对应 lang 值如下表所示：</p>
<p>标签</p>
<p>郎默认值</p>
<p>郎支持值</p>
<p>样式</p>
<p>CSS</p>
<p>CSS，少，上海社会科学院，手写笔</p>
<p>模板</p>
<p>wxml</p>
<p>wxml，XML，哈巴狗（原玉）</p>
<p>脚本</p>
<p>巴布尔</p>
<p>巴布尔，打字稿</p>
<h2 id="演示"><a href="#演示" class="headerlink" title="演示"></a>演示</h2><p>index.wpy</p>
<pre><code>&lt;style lang=&quot;less&quot;&gt;
.userinfo {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.userinfo-avatar {
  width: 80rpx;
  height: 80rpx;
  border-radius: 50%;
}

.userinfo-nickname {
  color: #aaa;
}
style&gt;
&lt;template&gt;
  &lt;view class=&quot;container&quot;&gt;
    &lt;view class=&quot;userinfo&quot; @tap=&quot;handleViewTap&quot;&gt;
      &lt;image class=&quot;userinfo-avatar&quot; src=&quot;{ { userInfo.avatarUrl }}&quot; background-size=&quot;cover&quot; /&gt;
      &lt;view class=&quot;userinfo-nickname&quot;&gt;{ { userInfo.nickName }}view&gt;
    view&gt;
    &lt;panel&gt;
      &lt;view&gt;{ { datas }}&#39;111&#39;view&gt;
      &lt;view @tap=&quot;doLogin&quot; class=&quot;item&quot;&gt;
        &lt;view class=&quot;item-inner&quot;&gt;登录view&gt;
      view&gt;
       &lt;view @tap=&quot;enevts&quot; class=&quot;item&quot;&gt;
        &lt;view class=&quot;item-inner&quot;&gt;用户信息view&gt;
      view&gt;
    panel&gt;
    &lt;panel&gt;
            &lt;view class=&quot;title&quot; slot=&quot;title&quot;&gt;测试数据绑定view&gt;
            &lt;text class=&quot;info&quot;&gt;{ {normalTitle}}text&gt;
            &lt;text class=&quot;info&quot;&gt;{ {setTimeoutTitle}}text&gt;
            &lt;text class=&quot;info&quot;&gt;{ {mixin}}text&gt;
            &lt;text class=&quot;info&quot;&gt;{ {mynum}}text&gt;
            &lt;text class=&quot;info&quot;&gt;{ {now}}text&gt;
            &lt;button @tap=&quot;plus(&#39;a&#39;)&quot; size=&quot;mini&quot;&gt; + button&gt;
          panel&gt;

          &lt;panel&gt;
            &lt;view class=&quot;title&quot; slot=&quot;title&quot;&gt;其它测试view&gt;
            &lt;button @tap=&quot;toast&quot; size=&quot;mini&quot;&gt;第三方组件button&gt;
            &lt;button @tap=&quot;communicate&quot; size=&quot;mini&quot;&gt;组件通信button&gt;
            &lt;button @tap=&quot;tap&quot; size=&quot;mini&quot;&gt;混合TAP事件button&gt;
          panel&gt;

          &lt;panel&gt;
            &lt;view class=&quot;title&quot; slot=&quot;title&quot;&gt;测试并发网络请求view&gt;
            &lt;view&gt;返回结果:
              &lt;text&gt;{ {netrst}}text&gt;
            view&gt;
            &lt;button @tap=&quot;request&quot; size=&quot;mini&quot;&gt; 点我发起10个请求 button&gt;
          panel&gt;

          &lt;panel&gt;
            &lt;view class=&quot;title&quot; slot=&quot;title&quot;&gt;测试组件view&gt;

            &lt;text class=&quot;testcounter&quot;&gt;计数组件1: text&gt;
            &lt;view class=&quot;counterview&quot;&gt;
              &lt;counter1 @index-emit=&quot;counterEmit&quot; /&gt;
            view&gt;

            &lt;text class=&quot;testcounter&quot;&gt;计数组件2: text&gt;

            &lt;view class=&quot;counterview&quot;&gt;
              &lt;counter2 :num.sync=&quot;mynum&quot;&gt;counter2&gt;
            view&gt;
          panel&gt;

          &lt;panel&gt;
            &lt;view class=&quot;title&quot; slot=&quot;title&quot;&gt;测试组件Repeatview&gt;
            &lt;repeat for=&quot;{ {groupList}}&quot; index=&quot;index&quot; item=&quot;item&quot; key=&quot;key&quot;&gt;
              &lt;group :grouplist=&quot;item&quot; :indexa=&quot;index&quot;&gt;group&gt;
            repeat&gt;
          panel&gt;

          &lt;panel&gt;
            &lt;view class=&quot;title&quot; slot=&quot;title&quot;&gt;测试列表view&gt;
            &lt;list&gt;list&gt;
          panel&gt;

    &lt;toast /&gt;
  view&gt;
template&gt;

&lt;script&gt;
import wepy from &#39;wepy&#39;
import List from &#39;../components/list&#39;
import Panel from &#39;../components/panel&#39;
import Counter from &#39;../components/counter&#39;
import Group from &#39;../components/group&#39;
import Toast from &#39;wepy-com-toast&#39;
import testMixin from &#39;../mixins/test&#39;
// 引入 QCloud 小程序增强 SDK
import qcloud from &#39;../assets/qcloud-weapp-client-sdk/index&#39;
export default class Index extends wepy.page {
  config = {
    navigationBarTitleText: &#39;test&#39;
  }
  components = {
    panel: Panel,
    counter1: Counter,
    counter2: Counter,
    list: List,
    group: Group,
    toast: Toast
  }
  mixins = [testMixin]

  data = {
    datas: &#39;&#39;,
    mynum: 20,
    userInfo: {
      nickName: &#39;加载中...&#39;
    },
    normalTitle: &#39;原始标题&#39;,
    setTimeoutTitle: &#39;标题三秒后会被修改&#39;,
    count: 0,
    netrst: &#39;&#39;,
    groupList: [
      {
        id: 1,
        name: &#39;点击改变&#39;,
        list: [
          {
            childid: &#39;1.1&#39;,
            childname: &#39;子项，点我改变&#39;
          }, {
            childid: &#39;1.2&#39;,
            childname: &#39;子项，点我改变&#39;
          }, {
            childid: &#39;1.3&#39;,
            childname: &#39;子项，点我改变&#39;
          }
        ]
      },
      {
        id: 2,
        name: &#39;点击改变&#39;,
        list: [
          {
            childid: &#39;2.1&#39;,
            childname: &#39;子项，点我改变&#39;
          }, {
            childid: &#39;2.2&#39;,
            childname: &#39;子项，点我改变&#39;
          }, {
            childid: &#39;2.3&#39;,
            childname: &#39;子项，点我改变&#39;
          }
        ]
      },
      {
        id: 3,
        name: &#39;点击改变&#39;,
        list: [
          {
            childid: &#39;3.1&#39;,
            childname: &#39;子项，点我改变&#39;
          }
        ]
      }
    ]
  }

  computed = {
    now() {
      return +new Date()
    }
  }

  methods = {
    doLogin() {
      qcloud.setLoginUrl(&#39;https://66280981.qcloud.la/api/user/login&#39;);
      qcloud.login({
        success: function (userInfo) {
          console.log(&#39;登录成功&#39;, userInfo);
        },
        fail: function (err) {
          console.log(&#39;登录失败&#39;, err);
        }
      });
    },
    enevts() {
       qcloud.request({
        url: `https://66280981.qcloud.la/api/user/info`,
        login: true,
        success: (response) =&gt; {
          console.log(response.data.data.userInfo)
          // this.me = response.data.data.userInfo;
          // this.connect();
        }
      });
    },
    plus() {
      this.mynum++
    },
    toast() {
      let promise = this.$invoke(&#39;toast&#39;, &#39;show&#39;, {
        title: &#39;自定义标题&#39;,
        img: &#39;https://raw.githubusercontent.com/kiinlam/wetoast/master/images/star.png&#39;
      })

      promise.then((d) =&gt; {
        console.log(&#39;toast done&#39;)
      })
    },
    tap() {
      console.log(&#39;do noting from &#39; + this.$name)
    },
    communicate() {
      console.log(this.$name + &#39; tap&#39;)

      this.$invoke(&#39;counter2&#39;, &#39;minus&#39;, 45, 6)
      this.$invoke(&#39;counter1&#39;, &#39;plus&#39;, 45, 6)

      this.$broadcast(&#39;index-broadcast&#39;, 1, 3, 4)
    },
    request() {
      let self = this
      let i = 10
      let map = [&#39;MA==&#39;, &#39;MQo=&#39;, &#39;Mg==&#39;, &#39;Mw==&#39;, &#39;NA==&#39;, &#39;NQ==&#39;, &#39;Ng==&#39;, &#39;Nw==&#39;, &#39;OA==&#39;, &#39;OQ==&#39;]
      while (i--) {
        wepy.request({
          url: &#39;https://www.madcoder.cn/tests/sleep.php?time=1&amp;t=css&amp;c=&#39; + map[i] + &#39;&amp;i=&#39; + i,
          success: function (d) {
            self.netrst += d.data + &#39;.&#39;
            self.$apply()
          }
        })
      }
    },
    counterEmit(...args) {
      let $event = args[args.length - 1]
      console.log(`${this.$name} receive ${$event.name} from ${$event.source.$name}`)
    }
  }

  events = {
    &#39;index-emit&#39;: (...args) =&gt; {
      let $event = args[args.length - 1]
      console.log(`${this.$name} receive ${$event.name} from ${$event.source.$name}`)
    }
  }

  onLoad() {
    let self = this
    this.$parent.getUserInfo(function (userInfo) {
      if (userInfo) {
        self.userInfo = userInfo
      }
      self.normalTitle = &#39;标题已被修改&#39;

      self.setTimeoutTitle = &#39;标题三秒后会被修改&#39;
      setTimeout(() =&gt; {
        self.setTimeoutTitle = &#39;到三秒了&#39;
        self.$apply()
      }, 3000)

      self.$apply()
    })
  }
}
script&gt;</code></pre>
            </div>
            <hr/>

            

    <div class="reprint" id="reprint-statement">
        
            <div class="reprint__author">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-user">
                        文章作者:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://jixioakang.com" rel="external nofollow noreferrer">xkloveme</a>
                </span>
            </div>
            <div class="reprint__type">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-link">
                        文章链接:
                    </i>
                </span>
                <span class="reprint-info">
                    <a href="http://jixioakang.com/2018/01/18/2018-01-19-xiao-cheng-xu-kai-fa-wepy-kuang-jia-lei-vue-de-kai-fa-fang-shi/">http://jixioakang.com/2018/01/18/2018-01-19-xiao-cheng-xu-kai-fa-wepy-kuang-jia-lei-vue-de-kai-fa-fang-shi/</a>
                </span>
            </div>
            <div class="reprint__notice">
                <span class="reprint-meta" style="font-weight: bold;">
                    <i class="fas fa-copyright">
                        版权声明:
                    </i>
                </span>
                <span class="reprint-info">
                    本博客所有文章除特別声明外，均采用
                    <a href="https://creativecommons.org/licenses/by/4.0/deed.zh" rel="external nofollow noreferrer" target="_blank">CC BY 4.0</a>
                    许可协议。转载请注明来源
                    <a href="http://jixioakang.com" target="_blank">xkloveme</a>
                    !
                </span>
            </div>
        
    </div>

    <script async defer>
      document.addEventListener("copy", function (e) {
        let toastHTML = '<span>复制成功，请遵循本文的转载规则</span><button class="btn-flat toast-action" onclick="navToReprintStatement()" style="font-size: smaller">查看</a>';
        M.toast({html: toastHTML})
      });

      function navToReprintStatement() {
        $("html, body").animate({scrollTop: $("#reprint-statement").offset().top - 80}, 800);
      }
    </script>



            <div class="tag_share" style="display: block;">
                <div class="post-meta__tag-list" style="display: inline-block;">
                    
                        <div class="article-tag">
                            
                                <a href="/tags/%E5%89%8D%E7%AB%AF/">
                                    <span class="chip bg-color">前端</span>
                                </a>
                            
                        </div>
                    
                </div>
                <div class="post_share" style="zoom: 80%; width: fit-content; display: inline-block; float: right; margin: -0.15rem 0;">
                    <link rel="stylesheet" type="text/css" href="/libs/share/css/share.min.css">

<div id="article-share">
    
    
    <div class="social-share" data-sites="twitter,facebook,google,qq,qzone,wechat,weibo,douban,linkedin" data-wechat-qrcode-helper="<p>微信扫一扫即可分享！</p>"></div>
    <script src="/libs/share/js/social-share.min.js"></script>
    

    

</div>

                </div>
            </div>
            
                <style>
  #reward {
    margin: 40px 0;
    text-align: center;
  }

  #reward .reward-link {
    font-size: 1.4rem;
    line-height: 38px;
  }

  #reward .btn-floating:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2), 0 5px 15px rgba(0, 0, 0, 0.2);
  }

  #rewardModal {
    width: 320px;
  }

  #rewardModal .reward-title {
    margin: 15px auto;
    padding-bottom: 5px;
  }

  #rewardModal .modal-content {
    padding: 10px;
  }

  #rewardModal .close {
    position: absolute;
    right: 15px;
    top: 15px;
    color: rgba(0, 0, 0, 0.5);
    font-size: 1.3rem;
    line-height: 20px;
    cursor: pointer;
  }

  #rewardModal .close:hover {
    color: #ef5350;
    transform: scale(1.3);
    -moz-transform: scale(1.3);
    -webkit-transform: scale(1.3);
    -o-transform: scale(1.3);
  }

  #rewardModal .reward-tabs {
    margin: 0 auto;
    width: 210px;
  }

  .reward-tabs .tabs {
    height: 38px;
    margin: 10px auto;
    padding-left: 0;
  }

  .reward-content ul {
    padding-left: 0 !important;
  }

  .reward-tabs .tabs .tab {
    height: 38px;
    line-height: 38px;
  }

  .reward-tabs .tab a {
    color: #fff;
    background-color: #ccc;
  }

  .reward-tabs .tab a:hover {
    background-color: #ccc;
    color: #fff;
  }

  .reward-tabs .wechat-tab .active {
    color: #fff !important;
    background-color: #22ab38 !important;
  }

  .reward-tabs .alipay-tab .active {
    color: #fff !important;
    background-color: #019fe8 !important;
  }

  .reward-tabs .reward-img {
    width: 210px;
  }
</style>

<div id="reward">
  <a
    href="#rewardModal"
    class="reward-link modal-trigger btn-floating btn-medium waves-effect waves-light red"
    >赏</a
  >

  <!-- Modal Structure -->
  <div id="rewardModal" class="modal">
    <div class="modal-content">
      <a class="close modal-close"><i class="fas fa-times"></i></a>
      <h4 class="reward-title">你的赏识是我前进的动力</h4>
      <div class="reward-content">
        <div class="reward-tabs">
          <ul class="tabs row">
            <li class="tab col s6 alipay-tab waves-effect waves-light">
              <a href="#alipay">支付宝</a>
            </li>
            <li class="tab col s6 wechat-tab waves-effect waves-light">
              <a href="#wechat">微 信</a>
            </li>
          </ul>
          <div id="alipay">
            <img
              src="/medias/reward/alipay.jpg"
              class="reward-img"
              alt="支付宝打赏二维码"
            />
          </div>
          <div id="wechat">
            <img
              src="/medias/reward/wechat.png"
              class="reward-img"
              alt="微信打赏二维码"
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<script>
  $(function() {
    $(".tabs").tabs();
  });
</script>

            
        </div>
    </div>

    
        <link rel="stylesheet" href="https://cdn.bootcss.com/gitalk/1.6.2/gitalk.min.css">
<link rel="stylesheet" href="/css/my-gitalk.css">

<div class="card gitalk-card" data-aos="fade-up">
    <div class="comment_headling" style="font-size: 20px; font-weight: 700; position: relative; left: 20px; top: 15px; padding-bottom: 5px;">
        <i class="fas fa-comments fa-fw" aria-hidden="true"></i>
        <span>评论</span>
    </div>
    <div id="gitalk-container" class="card-content"></div>
</div>

<script src="https://cdn.bootcss.com/gitalk/1.6.2/gitalk.min.js"></script>
<script>
    let gitalk = new Gitalk({
        clientID: 'f1e60c7afa53a51926b5',
        clientSecret: '2430231be04e68f6ba8ccf331c537cc19f50a0bd',
        repo: 'xkloveme.github.io',
        owner: 'xkloveme',
        admin: "xkloveme",
        id: '2018-01-18T21-34-00',
        distractionFreeMode: false  // Facebook-like distraction free mode
    });

    gitalk.render('gitalk-container');
</script>
    

    

    

    

    

    

<article id="prenext-posts" class="prev-next articles">
    <div class="row article-row">
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge left-badge text-color">
                <i class="fas fa-chevron-left"></i>&nbsp;上一篇</div>
            <div class="card">
                <a href="/2018/01/24/2018-01-25-chrome-kuo-zhan-crx-wen-jian/">
                    <div class="card-image">
                        
                        
                        <img src="https://picsum.photos/600/300" class="responsive-img" alt="下载谷歌浏览器(Chrome)扩展crx文件最简单的方法～">
                        
                        <span class="card-title">下载谷歌浏览器(Chrome)扩展crx文件最简单的方法～</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            下载谷歌浏览器(Chrome)扩展 crx 文件最简单的方法
先找到扩展的 id,进入http://yurl.sinaapp.com/crx.php粘贴扩展 ID，点击生成按钮。
Chrome 商店 Crx 离线安装包下载
第一步：输入应用
                        
                    </div>
                    <div class="publish-info">
                        <span class="publish-date">
                            <i class="far fa-clock fa-fw icon-date"></i>2018-01-24
                        </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E6%95%99%E7%A8%8B/" class="post-category">
                                    教程
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E5%B7%A5%E5%85%B7/">
                        <span class="chip bg-color">工具</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
        
        <div class="article col s12 m6" data-aos="fade-up">
            <div class="article-badge right-badge text-color">
                下一篇&nbsp;<i class="fas fa-chevron-right"></i>
            </div>
            <div class="card">
                <a href="/2017/12/29/2017-12-29-nuxt-cai-guo-de-keng/">
                    <div class="card-image">
                        
                        
                        <img src="https://picsum.photos/600/300" class="responsive-img" alt="nuxt踩过的坑">
                        
                        <span class="card-title">nuxt踩过的坑</span>
                    </div>
                </a>
                <div class="card-content article-content">
                    <div class="summary block-with-text">
                        
                            nuxt.js 简单介绍nuxt 官网：https://zh.nuxtjs.org/
1、nuxt.js 的原理图：具体的原理介绍官网有详细的解释，欢迎移步官网，这里不再复述。
2、nuxt.js 的优势1）就是我们无需为了路由划分而烦恼，
                        
                    </div>
                    <div class="publish-info">
                            <span class="publish-date">
                                <i class="far fa-clock fa-fw icon-date"></i>2017-12-29
                            </span>
                        <span class="publish-author">
                            
                            <i class="fas fa-bookmark fa-fw icon-category"></i>
                            
                            <a href="/categories/%E5%89%8D%E7%AB%AF/" class="post-category">
                                    前端
                                </a>
                            
                            
                        </span>
                    </div>
                </div>
                
                <div class="card-action article-tags">
                    
                    <a href="/tags/%E6%8A%80%E6%9C%AF/">
                        <span class="chip bg-color">技术</span>
                    </a>
                    
                    <a href="/tags/vue/">
                        <span class="chip bg-color">vue</span>
                    </a>
                    
                </div>
                
            </div>
        </div>
        
    </div>
</article>

</div>


<script>
    $('#articleContent').on('copy', function (e) {
        // IE8 or earlier browser is 'undefined'
        if (typeof window.getSelection === 'undefined') return;

        var selection = window.getSelection();
        // if the selection is short let's not annoy our users.
        if (('' + selection).length < Number.parseInt('120')) {
            return;
        }

        // create a div outside of the visible area and fill it with the selected text.
        var bodyElement = document.getElementsByTagName('body')[0];
        var newdiv = document.createElement('div');
        newdiv.style.position = 'absolute';
        newdiv.style.left = '-99999px';
        bodyElement.appendChild(newdiv);
        newdiv.appendChild(selection.getRangeAt(0).cloneContents());

        // we need a <pre> tag workaround.
        // otherwise the text inside "pre" loses all the line breaks!
        if (selection.getRangeAt(0).commonAncestorContainer.nodeName === 'PRE') {
            newdiv.innerHTML = "<pre>" + newdiv.innerHTML + "</pre>";
        }

        var url = document.location.href;
        newdiv.innerHTML += '<br />'
            + '来源: 小康之家<br />'
            + '文章作者: xkloveme<br />'
            + '文章链接: <a href="' + url + '">' + url + '</a><br />'
            + '本文章著作权归作者所有，任何形式的转载都请注明出处。';

        selection.selectAllChildren(newdiv);
        window.setTimeout(function () {bodyElement.removeChild(newdiv);}, 200);
    });
</script>


<!-- 代码块功能依赖 -->
<script type="text/javascript" src="/libs/codeBlock/codeBlockFuction.js"></script>

<!-- 代码语言 -->

<script type="text/javascript" src="/libs/codeBlock/codeLang.js"></script>

    
<!-- 代码块复制 -->

<script type="text/javascript" src="/libs/codeBlock/codeCopy.js"></script>


<!-- 代码块收缩 -->

<script type="text/javascript" src="/libs/codeBlock/codeShrink.js"></script>


<!-- 代码块折行 -->

<style type="text/css">
code[class*="language-"], pre[class*="language-"] { white-space: pre !important; }
</style>

    </div>
    <div id="toc-aside" class="expanded col l3 hide-on-med-and-down">
        <div class="toc-widget">
            <div class="toc-title"><i class="far fa-list-alt"></i>&nbsp;&nbsp;目录</div>
            <div id="toc-content"></div>
        </div>
    </div>
</div>

<!-- TOC 悬浮按钮. -->

<div id="floating-toc-btn" class="hide-on-med-and-down">
    <a class="btn-floating btn-large bg-color">
        <i class="fas fa-list-ul"></i>
    </a>
</div>


<script src="https://cdn.bootcss.com/tocbot/4.10.0/tocbot.min.js"></script>
<script>
    $(function () {
        tocbot.init({
            tocSelector: '#toc-content',
            contentSelector: '#articleContent',
            headingsOffset: -($(window).height() * 0.4 - 45),
            // headingsOffset: -205,
            headingSelector: 'h2, h3, h4'
        });

        // modify the toc link href to support Chinese.
        let i = 0;
        let tocHeading = 'toc-heading-';
        $('#toc-content a').each(function () {
            $(this).attr('href', '#' + tocHeading + (++i));
        });

        // modify the heading title id to support Chinese.
        i = 0;
        $('#articleContent').children('h2, h3, h4').each(function () {
            $(this).attr('id', tocHeading + (++i));
        });

        // Set scroll toc fixed.
        let tocHeight = parseInt($(window).height() * 0.4 - 64);
        let $tocWidget = $('.toc-widget');
        $(window).scroll(function () {
            let scroll = $(window).scrollTop();
            /* add post toc fixed. */
            if (scroll > tocHeight) {
                $tocWidget.addClass('toc-fixed');
            } else {
                $tocWidget.removeClass('toc-fixed');
            }
        });

        
        /* 修复文章卡片 div 的宽度. */
        let fixPostCardWidth = function (srcId, targetId) {
            let srcDiv = $('#' + srcId);
            if (srcDiv.length === 0) {
                return;
            }

            let w = srcDiv.width();
            if (w >= 450) {
                w = w + 21;
            } else if (w >= 350 && w < 450) {
                w = w + 18;
            } else if (w >= 300 && w < 350) {
                w = w + 16;
            } else {
                w = w + 14;
            }
            $('#' + targetId).width(w);
        };

        // 切换TOC目录展开收缩的相关操作.
        const expandedClass = 'expanded';
        let $tocAside = $('#toc-aside');
        let $mainContent = $('#main-content');
        $('#floating-toc-btn .btn-floating').click(function () {
            if ($tocAside.hasClass(expandedClass)) {
                $tocAside.removeClass(expandedClass).hide();
                $mainContent.removeClass('l9');
            } else {
                $tocAside.addClass(expandedClass).show();
                $mainContent.addClass('l9');
            }
            fixPostCardWidth('artDetail', 'prenext-posts');
        });
        
    });
</script>

    

</main>



    <footer class="page-footer bg-color">
  <div class="container row center-align">
    <div class="col s12 m8 l8 copy-right">
      Copyright&nbsp;&copy;
      <span id="year">年份</span>
      <a href="http://jixioakang.com" target="_blank">xkloveme</a>
      |&nbsp;Powered by&nbsp;<a href="https://hexo.io/" target="_blank">Hexo</a>
      <br />
       &nbsp;<i
        class="fas fa-chart-area"
      ></i
      >&nbsp;站点总字数:&nbsp;<span class="white-color"
        >141.5k</span
      >&nbsp;字      
      <span id="busuanzi_container_site_pv">
        |&nbsp;<i class="far fa-eye"></i>&nbsp;总访问量:&nbsp;<span
          id="busuanzi_value_site_pv"
          class="white-color"
        ></span
        >&nbsp;次
      </span>
       
      <span id="busuanzi_container_site_uv">
        |&nbsp;<i class="fas fa-users"></i>&nbsp;总访问人数:&nbsp;<span
          id="busuanzi_value_site_uv"
          class="white-color"
        ></span
        >&nbsp;人
      </span>
      
      <br />
      
      <span id="sitetime">载入运行时间...</span>
      <script>
        function siteTime() {
          window.setTimeout("siteTime()", 1000);
          var seconds = 1000;
          var minutes = seconds * 60;
          var hours = minutes * 60;
          var days = hours * 24;
          var years = days * 365;
          var today = new Date();
          var startYear = "2017";
          var startMonth = "3";
          var startDate = "13";
          var startHour = "0";
          var startMinute = "0";
          var startSecond = "0";
          var todayYear = today.getFullYear();
          var todayMonth = today.getMonth() + 1;
          var todayDate = today.getDate();
          var todayHour = today.getHours();
          var todayMinute = today.getMinutes();
          var todaySecond = today.getSeconds();
          var t1 = Date.UTC(
            startYear,
            startMonth,
            startDate,
            startHour,
            startMinute,
            startSecond
          );
          var t2 = Date.UTC(
            todayYear,
            todayMonth,
            todayDate,
            todayHour,
            todayMinute,
            todaySecond
          );
          var diff = t2 - t1;
          var diffYears = Math.floor(diff / years);
          var diffDays = Math.floor(diff / days - diffYears * 365);
          var diffHours = Math.floor(
            (diff - (diffYears * 365 + diffDays) * days) / hours
          );
          var diffMinutes = Math.floor(
            (diff - (diffYears * 365 + diffDays) * days - diffHours * hours) /
              minutes
          );
          var diffSeconds = Math.floor(
            (diff -
              (diffYears * 365 + diffDays) * days -
              diffHours * hours -
              diffMinutes * minutes) /
              seconds
          );
          if (startYear == todayYear) {
            document.getElementById("year").innerHTML = todayYear;
            document.getElementById("sitetime").innerHTML =
              "本站已安全运行 " +
              diffDays +
              " 天 " +
              diffHours +
              " 小时 " +
              diffMinutes +
              " 分钟 " +
              diffSeconds +
              " 秒";
          } else {
            document.getElementById("year").innerHTML =
              startYear + " - " + todayYear;
            document.getElementById("sitetime").innerHTML =
              "本站已安全运行 " +
              diffYears +
              " 年 " +
              diffDays +
              " 天 " +
              diffHours +
              " 小时 " +
              diffMinutes +
              " 分钟 " +
              diffSeconds +
              " 秒";
          }
        }
        setInterval(siteTime, 1000);
      </script>
      
      <br />
      
    </div>
    <div class="col s12 m4 l4 social-link social-statis">
      
    <a href="https://github.com/xkloveme" class="tooltipped" target="_blank" data-tooltip="访问我的GitHub" data-position="top" data-delay="50">
        <i class="fab fa-github"></i>
    </a>



    <a href="mailto:xkloveme@gmail.com" class="tooltipped" target="_blank" data-tooltip="邮件联系我" data-position="top" data-delay="50">
        <i class="fas fa-envelope-open"></i>
    </a>





    <a href="https://twitter.com/xkloveme" class="tooltipped" target="_blank" data-tooltip="关注我的Twitter: https://twitter.com/xkloveme" data-position="top" data-delay="50">
        <i class="fab fa-twitter"></i>
    </a>









    <a href="/atom.xml" class="tooltipped" target="_blank" data-tooltip="RSS 订阅" data-position="top" data-delay="50">
        <i class="fas fa-rss"></i>
    </a>


    </div>
  </div>
</footer>

<div class="progress-bar"></div>


    <!-- 搜索遮罩框 -->
<div id="searchModal" class="modal">
    <div class="modal-content">
        <div class="search-header">
            <span class="title"><i class="fas fa-search"></i>&nbsp;&nbsp;搜索</span>
            <input type="search" id="searchInput" name="s" placeholder="请输入搜索的关键字"
                   class="search-input">
        </div>
        <div id="searchResult"></div>
    </div>
</div>

<script src="/js/search.js"></script>
<script type="text/javascript">
$(function () {
    searchFunc("/" + "search.xml", 'searchInput', 'searchResult');
});
</script>
    <!-- 回到顶部按钮 -->
<div id="backTop" class="top-scroll">
    <a class="btn-floating btn-large waves-effect waves-light" href="#!">
        <i class="fas fa-arrow-up"></i>
    </a>
</div>


    <script src="https://cdn.bootcss.com/materialize/1.0.0/js/materialize.min.js"></script>
    <script src="https://cdn.bootcss.com/masonry/4.0.0/masonry.pkgd.min.js"></script>
    <script src="https://cdn.bootcss.com/aos/3.0.0-beta.6/aos.js"></script>
    <script src="https://cdn.bootcss.com/scrollprogress/3.0.2/scrollProgress.min.js"></script>
    <script src="https://cdn.bootcss.com/lightgallery/1.6.11/js/lightgallery-all.min.js"></script>
    <script src="/js/matery.js"></script>

    <!-- Global site tag (gtag.js) - Google Analytics -->

<script async src="https://www.googletagmanager.com/gtag/js?id=UA-102352377-2"></script>
<script>
    window.dataLayer = window.dataLayer || [];
    function gtag() {
        dataLayer.push(arguments);
    }

    gtag('js', new Date());
    gtag('config', 'UA-102352377-2');
</script>


    <!-- Baidu Analytics -->

    <!-- Baidu Push -->

<script>
    (function () {
        var bp = document.createElement('script');
        var curProtocol = window.location.protocol.split(':')[0];
        if (curProtocol === 'https') {
            bp.src = 'https://zz.bdstatic.com/linksubmit/push.js';
        } else {
            bp.src = 'http://push.zhanzhang.baidu.com/push.js';
        }
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(bp, s);
    })();
</script>

    
    <script src="/libs/others/clicklove.js" async="async"></script>
    
    
    <script async src="/libs/others/busuanzi.pure.mini.js"></script>
    

    

    

    

    

    
    <script type="text/javascript" src="/libs/background/ribbon-dynamic.js" async="async"></script>
    
    
    
    <script src="/libs/instantpage/instantpage.js" type="module"></script>
    

</body>

</html>
